import { NgxEchartsModule } from 'ngx-echarts';
import { NgModule } from '@angular/core';
import { DataVisualizationComponent } from './data-visualization.component';
import { RouterModule, Routes } from '@angular/router';
import { OverallComponent } from './overall/overall.component';
import { DashboardComponent } from './overall/dashboard/dashboard.component';
import { IncidentComponent } from './overall/incidentEcharts/incident.component';
import { AlertComponent } from './overall/alertEcharts/alert.component';
import { TrafficSituationComponent } from './overall/traffic-situation/traffic-situation.component';

import { PublicComponentModule } from 'app/public';
import { OlMapModule } from 'app/public/ol-map/ol-map.module';

import { IncidentAnalyticsComponent } from './incident-analytics/incident-analytics.component';
import { EquipmentAnalyticsComponent } from './equipment-analytics/equipment-analytics.component';
import { EquipmentPieComponent } from './equipment-analytics/equipment-pie/equipment-pie.component';

import { TrafficAnalyticsComponent } from './traffic-analytics/traffic-analytics.component';
import { TrafficFlowComponent } from './traffic-analytics/traffic-flow/traffic-flow.component';
import { RealtimeTrafficFlowComponent } from './traffic-analytics/realtime-traffic-flow/realtime-traffic-flow.component';
import { RoadCongestionRatioComponent } from './traffic-analytics/road-congestion-ratio/road-congestion-ratio.component';
import { ThreeRoadsComponent } from './traffic-analytics/three-roads/three-roads.component';
import { VehicleFlowComponent } from './traffic-analytics/vehicle-flow/vehicle-flow.component';
import { LastInfoComponent } from './traffic-analytics/last-info/last-info.component';

import { ShareModule } from 'app/shared/ShareModule';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
const COMPONENT = [
    DataVisualizationComponent,
    OverallComponent,
    IncidentAnalyticsComponent,
    EquipmentAnalyticsComponent,
    EquipmentPieComponent,
    TrafficAnalyticsComponent,
    DashboardComponent,
    IncidentComponent,
    AlertComponent,
    TrafficSituationComponent,
    TrafficFlowComponent,
    RealtimeTrafficFlowComponent,
    RoadCongestionRatioComponent,
    ThreeRoadsComponent,
    VehicleFlowComponent,
    LastInfoComponent
];

const routes: Routes = [
    {
        path: '',
        component: DataVisualizationComponent,
        children: [
            { path: '', redirectTo: 'overall', pathMatch: 'full' },
            { path: 'overall', component: OverallComponent },
            { path: 'incident-analytics', component: IncidentAnalyticsComponent },
            { path: 'traffic-analytics', component: TrafficAnalyticsComponent },
            { path: 'equipment-analytics', component: EquipmentAnalyticsComponent }
        ]
    }
];

@NgModule({
    imports: [
        ShareModule,
        NgxEchartsModule,
        RouterModule.forChild(routes),
        PublicComponentModule,
        ReactiveFormsModule,
        FormsModule,
        NgZorroAntdModule,
        OlMapModule
    ],
    declarations: COMPONENT
})
export class DataVisualizationModule {}
